home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10709 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: alfa.ist.utl.pt!l41471
  2. From: Nuno Silva <l41471@alfa.ist.utl.pt>
  3. Newsgroups: comp.lang.c
  4. Subject: Variant Records in C ... Is there a way ?
  5. Date: Tue, 19 Mar 1996 17:12:18 +0000
  6. Organization: Instituto Superior Tecnico 
  7. Message-ID: <Pine.OSF.3.91.960319170252.9783B-100000@alfa.ist.utl.pt>
  8. NNTP-Posting-Host: alfa.ist.utl.pt
  9. Mime-Version: 1.0
  10. Content-Type: TEXT/PLAIN; charset=US-ASCII
  11.  
  12.  
  13.     I would like to know if there is any  way of implementing in C a 
  14. structure that if a determined argument (or info or depending on the 
  15. value of a particular field of a structure) could ignore or acknoledge a 
  16. certain field of the structure ... 
  17.  
  18.     Example :
  19.         struct bla {
  20.             int field1;
  21.             int field2;
  22.             int field3;
  23.             } 
  24.     And having a struct looking like this one, consider field3 if 
  25. field1=1, or ignore it (by not placing it in the data structure thus 
  26. saving memory ...) 
  27.  
  28.     Any help would be highly  apreciated ... (even if it's just to 
  29. say that there isn't a way ... it would make me stop searching for it ;))
  30.  
  31.  
  32.     Regards from :
  33.             Nuno Miguel Almeida Silva                          
  34.             l41471@alfa.ist.utl.pt
  35.             http://alfa.ist.utl.pt/~l41471
  36. Instituto Superior Tecnico - Lisbon - Portugal
  37. There's a major genocide going on in East Timor 
  38.